package com.dlc.shop.systemtest.data.amount;

import com.dlc.shop.distribution.api.param.DistributionUserParam;
import com.dlc.shop.distribution.common.model.DistributionProd;

import java.util.Objects;

/**
 * @author: zsm
 * @date: 2023/2/24 16:19
 */
public class DistributionData {
    public static DistributionUserParam getRegistData(String userMobile){
        DistributionUserParam distributionUserParam = new DistributionUserParam();
        distributionUserParam.setUserMobile(userMobile);
        return distributionUserParam;
    }

    public static DistributionProd getDistributionProdParam(Long prodId, String awardNumber, Integer awardProportion,
                                                            Integer parentAwardSet, String parentAwardNumbers){
        DistributionProd distributionProd = new DistributionProd();
        distributionProd.setShopId(1L);
        distributionProd.setProdId(prodId);
        distributionProd.setAwardProportion(awardProportion);
        distributionProd.setAwardId(0L);
        distributionProd.setAwardNumberSet(0);
        distributionProd.setDefaultReward(0);
        distributionProd.setAwardNumbers(awardNumber);
        distributionProd.setParentAwardNumbers(Objects.isNull(parentAwardNumbers) ? "0" : parentAwardNumbers);
        distributionProd.setParentAwardSet(parentAwardSet);
        distributionProd.setState(1);
        return distributionProd;
    }

}
